Class ComponentItemImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.ui.impl.ComponentItemImpl
All Implemented Interfaces:
IPCObject, ComponentItem

public class ComponentItemImpl extends IPCObjectImpl implements ComponentItem
Information provided by the PKI file:

    \class ComponentItem
    
    \brief ComponentItem handles and manipulates component items, such as devices, on the workspace.
    
    \example appWindow().getActiveWorkspace().getLogicalWorkspace().getComponentItem("Router0")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Information provided by the PKI file:
      
          \brief Returns the name of this component item
          
          \return QString, name of the component item.
          
              
      Specified by:
      getName in interface ComponentItem
      Returns:
      String Returns a String
    • setVisible

      public void setVisible(boolean bVisible)
      Information provided by the PKI file:
      
          \brief Shows or hides the component item.
          
          \param bVisible, true to show the component item, false to hide it.
          
              
      Specified by:
      setVisible in interface ComponentItem
      Parameters:
      bVisible - Takes in a parameter of bVisible
    • type

      public int type()
      Information provided by the PKI file:
      
          \brief Returns the type of the component item.
          
          \return int,        the type of component.
          Types:                      COMPONENT = 1100,
          CONNECTION = 1101,
          NOTE = 1102,
          PACKET = 1103,
          CLUSTER = 1104,
          RECTANGLE = 1105,
          LINE = 1106,
          ELLIPSE = 1107,
          MULTIUSERITEM = 1108,
          QOSPACKET = 1109,
          RESIZEINDICATOR = 1110,
          ACCESSORYITEM = 1111,
          POLYGON = 1112,
          TEXTPOPUP = 1113
          
              
      Specified by:
      type in interface ComponentItem
      Returns:
      int Returns a int
    • moveBy

      public void moveBy(double x, double y)
      Information provided by the PKI file:
      
          \brief Moves the component item by the specified x and y values.
          
          \param x, the value to move the component item by on the x-axis.
          \param y, the value to move the component item by on the y-axis.
          
              
      Specified by:
      moveBy in interface ComponentItem
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
    • moveTo

      public void moveTo(double x, double y)
      Information provided by the PKI file:
      
          \brief Moves the component item to the specified coordinates.
          
          \param x, the value to move the component item to on the x-axis.
          \param y, the value to move the component item to on the y-axis.
          
              
      Specified by:
      moveTo in interface ComponentItem
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
    • device

      public Device device()
      Information provided by the PKI file:
      
          \brief Returns the device.
          
          \return Device, the device object.
          
              
      Specified by:
      device in interface ComponentItem
      Returns:
      Device Returns a Device
    • getXCoordinate

      public int getXCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the x-coordinate of the component item.
          
          \return int, the x-coordinate of the component item.
          
              
      Specified by:
      getXCoordinate in interface ComponentItem
      Returns:
      int Returns a int
    • getXCoordinateCenter

      public int getXCoordinateCenter()
      Information provided by the PKI file:
      
          \brief Returns the center x-coordinate of the component item.
          
          \return int, the center x-coordinate of the component item.
          
              
      Specified by:
      getXCoordinateCenter in interface ComponentItem
      Returns:
      int Returns a int
    • getYCoordinate

      public int getYCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the y-coordinate of the component item.
          
          \return int, the y-coordinate of the component item.
          
              
      Specified by:
      getYCoordinate in interface ComponentItem
      Returns:
      int Returns a int
    • getYCoordinateCenter

      public int getYCoordinateCenter()
      Information provided by the PKI file:
      
          \brief Returns the center y-coordinate of the component item.
          
          \return int, the center y-coordinate of the component item.
          
              
      Specified by:
      getYCoordinateCenter in interface ComponentItem
      Returns:
      int Returns a int
    • setX

      public void setX(double x)
      Information provided by the PKI file:
      
          \brief Sets the x-coordinate of the component item.
          
          \param x, the x-coordinate of the component item.
          
              
      Specified by:
      setX in interface ComponentItem
      Parameters:
      x - Takes in a parameter of x
    • setXCenter

      public void setXCenter(int x)
      Information provided by the PKI file:
      
          \brief Sets the center x-coordinate of the component item.
          
          \param x, the center x-coordinate of the component item.
          
              
      Specified by:
      setXCenter in interface ComponentItem
      Parameters:
      x - Takes in a parameter of x
    • setY

      public void setY(double y)
      Information provided by the PKI file:
      
          \brief Sets the y-coordinate of the component item.
          
          \param y, the y-coordinate of the component item.
          
              
      Specified by:
      setY in interface ComponentItem
      Parameters:
      y - Takes in a parameter of y
    • setYCenter

      public void setYCenter(int y)
      Information provided by the PKI file:
      
          \brief Sets the center y-coordinate of the component item.
          
          \param y, the y-coordinate of the component item.
          
              
      Specified by:
      setYCenter in interface ComponentItem
      Parameters:
      y - Takes in a parameter of y
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface ComponentItem
      Returns:
      int Returns a int
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface ComponentItem
      Returns:
      int Returns a int
    • setXVelocity

      public void setXVelocity(double xv)
      Information provided by the PKI file:
      
          \brief Sets the x-axis velocity of the component item.
          
          \param xv, the x-axis velocity of the component item.
          
              
      Specified by:
      setXVelocity in interface ComponentItem
      Parameters:
      xv - Takes in a parameter of xv
    • setYVelocity

      public void setYVelocity(double yv)
      Information provided by the PKI file:
      
          \brief Sets the y-axis velocity of the component item.
          
          \param yv, the y-axis velocity of the component item.
          
              
      Specified by:
      setYVelocity in interface ComponentItem
      Parameters:
      yv - Takes in a parameter of yv
    • setVelocity

      public void setVelocity(double xv, double yv)
      Information provided by the PKI file:
      
          \brief Sets the x-axis and y-axis velocity of the component item.
          
          \param xv, the x-axis velocity of the component item.
          \param yv, the y-axis velocity of the component item.
          
              
      Specified by:
      setVelocity in interface ComponentItem
      Parameters:
      xv - Takes in a parameter of xv
      yv - Takes in a parameter of yv
    • xVelocity

      public double xVelocity()
      Information provided by the PKI file:
      
          \brief Returns the x-axis velocity of the component item.
          
          \return double, the x-axis velocity of the component item.
          
              
      Specified by:
      xVelocity in interface ComponentItem
      Returns:
      double Returns a double
    • yVelocity

      public double yVelocity()
      Information provided by the PKI file:
      
          \brief Returns the y-axis velocity of the component item.
          
          \return double, the y-axis velocity of the component item.
          
              
      Specified by:
      yVelocity in interface ComponentItem
      Returns:
      double Returns a double
    • setSelected

      public void setSelected(boolean bSelected)
      Information provided by the PKI file:
      
          \brief Selects or deselects the component item.
          
          \param bSelected, true to select the item, false to deselect it.
          
              
      Specified by:
      setSelected in interface ComponentItem
      Parameters:
      bSelected - Takes in a parameter of bSelected
    • getClusterID

      public String getClusterID()
      Information provided by the PKI file:
      
          \brief Returns the cluster ID of the component item.
          
          \return string, the cluster ID of the component item.
          
              
      Specified by:
      getClusterID in interface ComponentItem
      Returns:
      String Returns a String
    • getThisClusterID

      public String getThisClusterID()
      Specified by:
      getThisClusterID in interface ComponentItem
      Returns:
      String Returns a String
    • getParent

      public ComponentItem getParent()
      Information provided by the PKI file:
      
          \brief Returns the parent cluster that contains this component item.
          
          \return ComponentItem, the parent cluster that contains this component item.
          
              
      Specified by:
      getParent in interface ComponentItem
      Returns:
      ComponentItem Returns a ComponentItem
    • moveOutOfCurrentCluster

      public boolean moveOutOfCurrentCluster()
      Information provided by the PKI file:
      
          \brief Moves the component item out of the current cluster and returns whether it was successful.
          
          \return boolean, whether the move was successful.
          
              
      Specified by:
      moveOutOfCurrentCluster in interface ComponentItem
      Returns:
      boolean Returns a boolean
    • moveIntoCluster

      public boolean moveIntoCluster(String name)
      Information provided by the PKI file:
      
          \brief Moves the component item into a cluster in the same level with the specified name and returns whether it was successful.
          
          \param name, the name of the cluster in the same level
          \return boolean, whether the move was successful.
          
              
      Specified by:
      moveIntoCluster in interface ComponentItem
      Parameters:
      name - Takes in a parameter of name
      Returns:
      boolean Returns a boolean
    • loadAccessoryImage

      public boolean loadAccessoryImage(int slotNum, String imagePath)
      Information provided by the PKI file:
      
          \brief Loads an image for an accessory.
          
          \param slotNum, accessory slot index.
          \param imagePath, path to the image to use for the accessory.
          
          \return bool, true if successful, false if not.
          
              
      Specified by:
      loadAccessoryImage in interface ComponentItem
      Parameters:
      slotNum - Takes in a parameter of slotNum
      imagePath - Takes in a parameter of imagePath
      Returns:
      boolean Returns a boolean
    • removeAccessory

      public void removeAccessory(int slotNum)
      Information provided by the PKI file:
      
          \brief Removes an accessory.
          
          \param slotNum, index of the accessory to remove.
          
              
      Specified by:
      removeAccessory in interface ComponentItem
      Parameters:
      slotNum - Takes in a parameter of slotNum